#include<stdio.h>
void psort(int *pa, int *pb, int *pc, int *pd)
{
    int t;
    if(*pb > *pa)
    {
        t = *pa;
        *pa = *pb;
        *pb = t;
    }
    if(*pc > *pb)
    {
        t = *pc;
        *pc = *pb;
        *pb = t;
        if(*pb > *pa)
        {
            t = *pa;
            *pa = *pb;
            *pb = t;
        }
    }
    if(*pd > *pc)
    {
        t = *pd;
        *pd = *pc;
        *pc = t;
        if(*pc > *pb)
        {
            t = *pc;
            *pc = *pb;
            *pb = t;
            if(*pb > *pa)
            {
                t = *pa;
                *pa = *pb;
                *pb = t;
            }
        }
    }
}
int main()
{
    int a, b, c, d;
    scanf("%d %d %d %d", &a, &b, &c, &d);
    psort(&a, &b, &c, &d);
    printf("%d %d %d %d", a, b, c, d);
    return 0;
}
